<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>deep</title>
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
</head>
<body>
<div id="case10-demo5">
    <p>obj.a{{user.a}}</p>
    <p>obj.a:<input type="text" v-model="user.a"></p>
</div>
<script type="text/javascript">
    var case10Demo5=new Vue({
        el:"#case10-demo5",
        data:{
            user:{
                a:123
            }
        }
    })
    case10Demo5.$watch("user",function (newValue,oldValue) {
        console.log("计数器值的变化:",newValue,oldValue)
    },{
        deep:true
    })
</script>
</body>
</html>